package com.job.kujiale;

import java.util.*;

/**
 * <p>
 *
 * </p>
 *
 * @author 12071
 * @date 2022/10/10 16:34
 */
public class A3 {

    Map<String,Queue<String>> events = new HashMap<>();
    Map<String, Set<String>> members = new HashMap<>();

//    public void post(String event, String msg){
//        Queue<String> queue = events.getOrDefault(event, new LinkedList<>());
//        queue.add(msg);
//        events.put(event,queue);
//    }
//
//    public void publish(String event){
//        if (events.containsKey(event) && members.containsKey(event)){
//            Set<String> member = members.get(event);
//            String msg = events.get(event).poll();
//            for(String m: member){
//                // 发送消息给 订阅者 m
//                sendMsg(m,msg);
//            }
//        }
//    }
//
//    public void require(String event){
//        Set<String> set = members.getOrDefault(event, new HashSet<>());
//
//    }

}
